package com.kaiwukj.android.ufamily.mvp.http.entity.result;

import com.kaiwukj.android.ufamily.mvp.http.entity.base.BaseBean;

import java.text.DecimalFormat;

public class CommunityResult extends BaseBean {

    /**
     * "id": 19,
     * "communityName": "恒茂国际都会",
     * "province": "360000",
     * "city": "360100",
     * "district": "360111",
     * "address": "恒茂国际都会",
     * "distance": 0.11442421796815
     */

    private int id;
    private String communityName;
    private String address;
    private Double distance;
    private String province;
    private String city;
    private String district;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getCommunityName() {
        return communityName;
    }

    public void setCommunityName(String communityName) {
        this.communityName = communityName;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Double getDistance() {
        return distance;
    }

    public void setDistance(Double distance) {
        this.distance = distance;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getDistrict() {
        return district;
    }

    public void setDistrict(String district) {
        this.district = district;
    }

    public String getDistanceStr() {
        DecimalFormat df = new DecimalFormat("#.#");
        return df.format(getDistance());
    }
}
